package com.codebox.activity;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

import com.codebox.R;
import com.lib.BaseActivity;
import com.lib.EventBus;

public class AboutActivity extends BaseActivity {
    private Button runButton;
	public EventBus mViewController;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);	
		mViewController = EventBus.getInstance();	
//		setContentView(R.layout.activity_about);
//        Toolbar toolbar= (Toolbar) findViewById(R.id.tl_custom);
//        toolbar.setTitle("关于");//设置Toolbar标题
//        toolbar.setTitleTextColor(Color.parseColor("#ffffff")); //设置标题颜色
//        setSupportActionBar(toolbar);
		setConttentViewAndToolbar(R.layout.activity_about,"关于");
        showBackHomeButton();
        runButton = (Button)findViewById(R.id.run);
		runButton.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v){
				Uri uri = Uri.parse("http://www.jcodecraeer.com");
		        Intent it = new Intent(Intent.ACTION_VIEW, uri);
		        it.setData(uri); 
		        it.setAction( Intent.ACTION_VIEW); 
		        startActivity(it); 				 
			}
		});	 
	}
}
